package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;

public class LoadAttachmentsEvent extends GwtEvent<LoadAttachmentsEventHandler> {

    public static Type<LoadAttachmentsEventHandler> TYPE = new Type<LoadAttachmentsEventHandler>();

    private final Long articleId;

    public LoadAttachmentsEvent(Long articleId) {
        super();
        this.articleId = articleId;

    }

    public Long getArticleId() {
        return articleId;
    }

    @Override
    protected void dispatch(LoadAttachmentsEventHandler handler) {
        handler.onLoadAttachments(this);
    }

    @Override
    public Type<LoadAttachmentsEventHandler> getAssociatedType() {
        return TYPE;
    }

}
